import Vue from 'vue'
import Router from 'vue-router'
import Homepage from '@/components/Home.vue'
import Welfare from '@/components/Welfare.vue'
import ShoppingCar from '@/components/ShoppingCar.vue'
import Goodsdetails from '@/components/goodsdetails.vue'
import Order from '@/components/Order.vue'
import Myself from '@/components/myself.vue'
import Myself1 from '@/components/myself1.vue'
import Registered from '@/components/Register.vue'
import Login from '@/components/Login.vue'
import Appfooter from '@/components/appfooter.vue'
import Shopdetails from '@/components/shopdetails.vue'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect:{
        name:'homepage'
      }
    },
    {
      path: '/footer',
      name: 'footer',
      component: Appfooter
    },
    {
      path: '/homepage',
      name: 'homepage',
      component: Homepage
    },
    {
      path: '/welfare',
      name: 'wlf',
      component: Welfare
    },
    {
      path: '/shoppingcar',
      name: 'shopping',
      component: ShoppingCar
    },
    {
      path: '/goodsdetails',
      name: 'goodsdetails',
      component: Goodsdetails
    },
    {path:'/order',
    name:'order',
    component:Order},
    {
      path:'/myself',
      name:'myself',
      component:Myself
    },
    {
      path:'/myself1',
      name:'myself1',
      component:Myself1
    },
    {
      path:'/registered',
      name:'registered',
      component:Registered
    },
    {
      path:'/login',
      name:'login',
      component:Login
    },
    {
      path:'/shopdetails/:shop_id',
      name:'shopdetails',
      component:Shopdetails,
      props:true
    }
  ]
})
